import request from "@/utils/request";

export function getEnumGroupList() {
  return request({
    url: "/resourcevisualization/enum/getEnumGroupList",
    method: "get",
  });
}

export function getEnumItemByGroupName(groupName) {
  return request({
    url: "/resourcevisualization/enum/getEnumItemByGroupName/" + groupName,
    method: "get",
  });
}

export function addEnumData(data) {
  return request({
    url: "/resourcevisualization/enum/addEnumData",
    method: "post",
    data,
  });
}

export function addEnumItem(data) {
  return request({
    url: "/resourcevisualization/enum/addEnumItem",
    method: "post",
    data,
  });
}

export function updateEnumGroup(data) {
  return request({
    url: "/resourcevisualization/enum/updateEnumGroup",
    method: "post",
    data,
  });
}

export function deleteEnumGroupByGroupName(data) {
  return request({
    url:
      "/resourcevisualization/enum/deleteEnumGroupByGroupName?groupName=" +
      data,
    method: "post",
  });
}

export function deleteEnumItemByItemId(itemId) {
  return request({
    url: "/resourcevisualization/enum/deleteEnumItemByItemId?itemId=" + itemId,
    method: "post",
  });
}

export function getEnumItemByGroupId(groupId) {
  return request({
    url: "/resourcevisualization/enum/getEnumItemByGroupId/" + groupId,
    method: "get",
  });
}
